package cn.edu.scau.cmi.mazhixiang.simplyfactory;

public class SimpleFactory {
	public static AutoInsurance getPolicyObj(String option) {
		AutoInsurance policy=null;
		if(option.compareTo("bodyinjure")==0) {policy=new BodyInjury();}
		else if(option.compareTo("cardestroy")==0) {policy=new CarDestroy();}
		else if(option.compareTo("peopledead")==0) {policy=new PeopleDead();}
		return policy;
	}
}
